/* 
* sepprfrc.h - This file is a part of the sep-library 
*
* Copyright (C) 2008 Jesper Schmidt Hansen 
* 
* License: GPL - see COPYING for copying conditions.
* There is ABSOLUTELY NO WARRANTY, not even for MERCHANTIBILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* Contact: schmidt@zigzak.net
*/

#ifndef __SEPPRFRC_H__
#define __SEPPRFRC_H__

#include <stdlib.h>
#include <string.h>
#include "sepdef.h"
#include "sepstrct.h"
#include "separray.h"
#include "sepmisc.h"

#ifdef OMP
#include <omp.h>
#endif



void sep_force_pairs(seppart *ptr, const char *types, double cf,
		     double (*fun)(double, char), sepsys *sys, 
		     sepret *retval, const unsigned opt);


void sep_force_pair_brute(seppart *ptr, const char *types, double cf,
			  double (*fun)(double, char), sepsys *sys, 
			  sepret *retval, const int opt);

void sep_force_pair_neighb(seppart *ptr, const char *types, double cf,
				 double (*fun)(double, char), sepsys *sys, 
				 sepret *retval);


void sep_make_neighblist(seppart *ptr, sepsys *sys, const unsigned opt);


void sep_neighb_excl_same_mol(seppart *ptr, sep3D sys);
void sep_neighb(seppart *ptr, sep3D sys);
void sep_neighb_nonbonded(seppart *ptr, sep3D sys);

void sep_make_neighblist_from_llist(seppart *ptr, int nneighb, 
				    int *list, sepsys sys);
void sep_make_neighblist_from_llist_nonbonded(seppart *ptr, int nneighb, 
				   int *list, sepsys sys);
void sep_make_neighblist_from_llist_excl_same_mol(seppart *ptr, int nneighb, 
				       int *list, sep3D sys);


int *sep_allocate_celllist(sep3D sys);
void sep_make_celllist(seppart *ptr, int *list, sepsys sys);
void sep_get_bond_alltoall(seppart *ptr, int **bond, int npart);
unsigned int sep_bonded(int **bond, int j1, int j2);
unsigned int sep_bonded_direct(seppart *ptr, int j1, int j2);

void sep_force_pair_neighb_omp(seppart *ptr, const char *types, double cf,
			       double (*fun)(double, char), sepsys *sys, 
			       sepret *retval);


void sep_add_interaction(sepsys *sys, char types[], double cf, 
			 double (*fun)(double,char));

// New - Piotr
void _sep_force_pairs(seppart *ptr, sepsys *sys, 
		      sepret *retval, unsigned n, 
		      const unsigned opt);

void _sep_force_pair_brute(seppart *ptr, sepsys *sys, 
			   sepret *retval, const int opt);


void _sep_force_pair_neighb(seppart *ptr,  sepsys *sys, 
			    sepret *retval) ;

void _sep_force_pair_neighb_omp(seppart *ptr, sepsys *sys,  sepret *retval);

#endif
